package edu.rmit.service;

import java.rmi.RemoteException;
import java.util.List;

import edu.rmit.domain.Group;
import edu.rmit.domain.User;

/**
 * This interface defines the group operation. Like get groups by
 * status, delete group, and change group status function.
 * 
 * @author Thaw Zin
 * @version 1.0
 */
public interface IGroupService extends IServerService {
	/**
	 * This method is to  define the operation to  get groups by status.
	 * 
	 * @param destincationStatus
	 *            The destination status of the group
	 * @return A list of group which the group status is in this status
	 */
	public List<Group> getInterestGroups(boolean isActive) throws RemoteException;

	/**
	 * This method is to  define the operation to  add a group to the system.
	 * 
	 * @param currentUser
	 *            The current user who want to add a group
	 * @param name
	 *            The group name which the user want to to add
	 * @param description
	 *            The description of the group.
	 */
	public void addGroup(User currentUser, String name, String description) throws RemoteException;
	
	/**
	 * The method is to  define the operation to delete a group by id.
	 * 
	 * @param groupId
	 *            The group id which a user want to delete.
	 */
	public void removeGroup(int groupId) throws RemoteException;
	
	/**
	 * This method is to define the operation to  change a group status.
	 * 
	 * @param groupId
	 *            The group id which a group want to change.
	 * @param destinationStatus
	 *            The destination status which a current group's status.
	 */
	public void changeGroupStatus(int groupId,boolean destinationStatus) throws RemoteException;
}
